<%@page import="cn.edu.hpu.entity.Goal"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>新PMS项目</title>
	<script type="text/javascript" src="bootstrap/jquery.js"></script>
	<script type="text/javascript" src="bootstrap/bootstrap.min.js"></script>
	<link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.min.css" />
	<style type="text/css">
		body{
			background-image:url("bootstrap/backgroundimg.png");
			font-family:"微软雅黑";
		}
		.div1{
			margin-left:20px;
			width:500px;
			height:auto;
		}
		.tr1{
			background-color:grey;
			color:white;
		}
		td{
			padding-left:30px;
			font-size:18px;
		}
		a{
			color:blue;
			text-derection:none;
		}
		.btn-group{
			margin-bottom:10px;
		}
	</style>
</head>
<body>
	<%
		Goal g = (Goal)request.getAttribute("goal");
	 %>
	<div class="div1">
			<div class="div3">
				<table border="1" width="500">
					<tr height="40" class="tr1">
						<td width="300"><i class="icon-th icon-white"></i><a href="prod.jspx?method=goaltask&id=<%=g.getGid()%>"><%=g.getGname() %></a></td><!--目标名称,并且点击此名称可以进入目标显示页-->
						<td><i class=" icon-pencil icon-white"></i><a href="prod.jspx?method=updategoal&gid=<%=g.getGid()%>">编辑</a></td><!--点击此编辑可以进入编辑目标页,需要命名编辑页的名称-->
					</tr>
					<tr>
						<td colspan="2">
							<%=g.getGdsp()%><!--输出目标描述-->
							<br/>
							<div class="progress progress-danger">
							<%
								String sum = (String)request.getAttribute("sum");
							 %>
								<div class="bar" style="width:${sum}%;">已完成${sum }%</div>
							</div>
						<br/>
						<br/>
							<a href="prod.jspx?method=newtask&id=<%=g.getGid()%>" class="btn btn-success"><i class="icon-plus icon-white"></i>添加新任务</a>
						<br/>
							<hr/>
							<!-- 循环输出任务 -->
							<c:forEach items="${tlist }" var="t">
								<a href="prod.jspx?method=updatetask&id=${t.tid }&gid=<%=g.getGid() %>">${t.tname }</a>[${t.tcname }]<br/>
									${t.tdsp }<br/>
								<div class="progress progress-danger">
										<div class="bar" style="width:${t.tstate}%;">已完成${t.tstate }%</div>
									</div>
									<br/>						
							</c:forEach>
						</td>
					</tr>
				</table>

		</div>
	</div>
</body>
</html>